var mysql = require('mysql');
//把数据库的密码，账号，地址，端口，表格都连接上！！
var connection = mysql.createConnection({
    host: 'localhost',
    user: 'root',
    password: '123456',
    port: '3306',
    database: 'qd2004'
});
connection.connect(); 

 
//从该数据库中查找数据
exports.searchUser =  function(callback){
    var sql = 'SELECT * FROM YouCongUsers';
    connection.query(sql, function (err, res) {
        callback&&callback(err,res)
    });
}


// connection.end(); 